/* Copyright (c) 2019, The Linux Foundation. All rights reserved.
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License version 2 and
 * only version 2 as published by the Free Software Foundation.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 */

/* common diff with msm-pm660.dtsi */
&spmi_bus {
	qcom,pm660@0 {
		qcom,power-on@800 {
			qcom,pon_1 {
				qcom,support-reset = <1>;
				qcom,s1-timer = <4480>;
				qcom,s2-timer = <2000>;
				qcom,s2-type = <7>;
			};

			qcom,pon_3 {
				qcom,pon-type = <3>;
				qcom,pull-up = <1>;
				qcom,support-reset = <1>;
				qcom,s1-timer = <4480>;
				qcom,s2-timer = <1000>;
				qcom,s2-type = <1>;
			};
		};
	};
};

&pm660_vadc {
	backlight_therm {
		reg = <ADC_AMUX_THM4_PU2>;
		label = "backlight_therm";
		qcom,ratiometric;
		qcom,hw-settle-time = <200>;
		qcom,pre-scaling = <1 1>;
	};
};

&thermal_zones {
	backlight_therm {
		polling-delay-passive = <0>;
		polling-delay = <0>;
		thermal-governor = "user_space";
		thermal-sensors = <&pm660_adc_tm ADC_AMUX_THM4_PU2>;
		trips {
			active-config0 {
				temperature = <125000>;
				hysteresis = <1000>;
				type = "passive";
			};
		};
	};
};

&pm660_charger {
	qcom,sw-jeita-enable;
};

&pm660_fg {
	qcom,fg-cutoff-voltage = <3400>;
	qcom,fg-chg-term-current = <200>;
	qcom,fg-sys-term-current = <300>;
	qcom,fg-jeita-thresholds = <0 15 45 60>;
	qcom,fg-jeita-hyst-temp = <0>;
};

/* common diff with msm-pm660l.dtsi */
&pm660l_wled {
	/delete-property/ qcom,auto-calibration;
	qcom,fs-current-limit = <20000>;
	qcom,en-cabc;
	qcom,string-cfg = <3>;
};

&pm660l_flash0 {
	qcom,current-ma = <900>;
};

&pm660l_flash1{
	qcom,current-ma = <900>;
};

&pm660l_flash2 {
	qcom,max-current = <100>;
	qcom,current-ma = <90>;
};

&pm660l_torch0 {
	qcom,max-current = <1000>;
	qcom,current-ma = <100>;
};

&pm660l_torch1 {
	qcom,max-current = <1000>;
	qcom,current-ma = <100>;
};

&pm660l_torch2 {
	qcom,max-current = <150>;
	qcom,current-ma = <90>;
};

&flash_led {
	qcom,flashlight_0 {
		label = "flashlight";
		qcom,led-name = "flashlight";
		qcom,torch-name = "led:torch_0", "led:torch_1";
		qcom,switch-name = "led:switch_0";
		qcom,id = <0>;
	};
};

&lcdb_ldo_vreg {
	qcom,ldo-ilim-ma = <260>;
};

&lcdb_ncp_vreg {
	qcom,ncp-ilim-ma = <260>;
};
